package com.ccys.cms.interceptor;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @description 注册拦截器
 * @date     2023/12/11
 * @author   cloud fly
 */

@Configuration
public class RegisterInterceptorConfig implements WebMvcConfigurer {

 @Bean
 CheckInterceptor checkInterceptor(){
     return new CheckInterceptor();
 }


 @Override
 public void addInterceptors(InterceptorRegistry registry) {
     registry.addInterceptor(checkInterceptor());
     System.out.println("===========   校验操作拦截器注册完毕   ===========");
 }

}
